package cn.lili.modules.order.cart.entity.enums;

import cn.hutool.core.text.CharSequenceUtil;

/**
 * 配送方式
 *
 * @author paulG
 * @since 2020-03-25 2:30 下午
 **/
public enum DeliveryMethodEnum {

    /**
     * "自提"
     */
    SELF_PICK_UP("自提", ""),
    /**
     * "同城配送"
     */
    LOCAL_TOWN_DELIVERY("同城配送", ""),
    /**
     * "物流"
     */
    LOGISTICS("物流", "Logistics");

    private final String description;
    private final String descriptionEnglish;

    DeliveryMethodEnum(String description, String descriptionEnglish)
    {
        this.description = description;
        this.descriptionEnglish = descriptionEnglish;
    }

    public String getDescription() {
        if (CharSequenceUtil.isNotBlank(this.descriptionEnglish)) {
            return this.descriptionEnglish;
        }
        return description;
    }

}
